import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';

@Schema({
  // timestamps: true,
  // toJSON: {
  //   transform(doc, ret) {
  //     delete ret.password;
  //     delete ret.__v;
  //     delete ret._id;
  //     if (ret.createdAt) {
  //       ret.createdAt = new Date(ret.createdAt).toLocaleString('zh-CN', {
  //         timeZone: 'Asia/Shanghai',
  //       });
  //     }
  //     if (ret.updatedAt) {
  //       ret.updatedAt = new Date(ret.updatedAt).toLocaleString('zh-CN', {
  //         timeZone: 'Asia/Shanghai',
  //       });
  //     }
  //     return ret;
  //   },
  // },
})
export class Channel {
  @Prop()
  channelName: string;
}
export const ChannelSchema = SchemaFactory.createForClass(Channel);
